home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Utilities / Other / upsd / ups_folder / patch02.script < prev    next >
Encoding:
Text File  |  1991-05-01  |  4.1 KB  |  135 lines

  1. #! /bin/sh
  2. # This is a shell archive.  Remove anything before this line, then feed it
  3. # into a shell via "sh file" or similar.  To overwrite existing files,
  4. # type "sh file -c".
  5. # The tool that generated this appeared in the comp.sources.unix newsgroup;
  6. # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
  7. # Contents:  Patch02
  8. # Wrapped by kent@sparky on Thu Apr 11 22:42:00 1991
  9. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  10. echo If this archive is complete, you will see the following message:
  11. echo '          "shar: End of archive."'
  12. if test -f 'Patch02' -a "${1}" != "-c" ; then 
  13.   echo shar: Will not clobber existing file \"'Patch02'\"
  14. else
  15.   echo shar: Extracting \"'Patch02'\" \(2727 characters\)
  16.   sed "s/^X//" >'Patch02' <<'END_OF_FILE'
  17. X*** HISTORY.orig    Thu Apr 11 08:11:34 1991
  18. X--- HISTORY    Thu Apr 11 08:15:12 1991
  19. X***************
  20. X*** 1,7 ****
  21. X! RELEASE HISTORY
  22. X  
  23. X  Date      Release  Patch  Description
  24. X  -------------------------------------------------------------------------------
  25. X! 03/30/91  1.0      0      Initial release to net
  26. X  04/09/91  1.0      1      Fixed stupidity with ups_time alarm setting and
  27. X!                           added version stuff
  28. X--- 1,9 ----
  29. X! UPSD RELEASE HISTORY    art@pilikia.pegasus.com
  30. X  
  31. X  Date      Release  Patch  Description
  32. X  -------------------------------------------------------------------------------
  33. X! 03/30/91  1.0      0      Initial release to net.
  34. X  04/09/91  1.0      1      Fixed stupidity with ups_time alarm setting and
  35. X!                           added version stuff.
  36. X! 04/10/91  1.0      2      Added log file locking, only 1 upsd can be running
  37. X!                           now.  Also added date to version string.
  38. X*** common.h.orig    Thu Apr 11 08:11:34 1991
  39. X--- common.h    Thu Apr 11 08:15:12 1991
  40. X***************
  41. X*** 12,17 ****
  42. X--- 12,18 ----
  43. X  #include <string.h>
  44. X  #include <fcntl.h>
  45. X  #include <time.h>
  46. X+ #include <unistd.h>
  47. X  #include <sys/types.h>
  48. X  #include <sys/termio.h>
  49. X  #include <sys/signal.h>
  50. X*** funcs.c.orig    Thu Apr 11 08:11:35 1991
  51. X--- funcs.c    Thu Apr 11 08:15:12 1991
  52. X***************
  53. X*** 153,158 ****
  54. X--- 153,162 ----
  55. X          if ((log_fd = open(ups_log, LOG_FLAGS, LOG_PERMS)) == ERR)
  56. X              exit(1);
  57. X  
  58. X+         /* and advisory lock it */
  59. X+         if (lockf(log_fd, F_TLOCK, 0L) == ERR)
  60. X+             exit(1);
  61. X+ 
  62. X          writelog(START_MSG);
  63. X  
  64. X          /* open blocks on UPS switch to battery */
  65. X***************
  66. X*** 292,301 ****
  67. X  {
  68. X      char   *basename();
  69. X  
  70. X!     /* display version if foreground */
  71. X      if (signal(SIGINT, SIG_IGN) != SIG_IGN)
  72. X!         fprintf(stderr, "%s v%d.%d patchlevel %d\n", basename(s),
  73. X!             RELEASE, REVISION, PATCHLEVEL);
  74. X  }
  75. X  
  76. X  /*
  77. X--- 296,306 ----
  78. X  {
  79. X      char   *basename();
  80. X  
  81. X!     /* display version in foreground */
  82. X      if (signal(SIGINT, SIG_IGN) != SIG_IGN)
  83. X!         fprintf(stderr, "%s release %s version %d.%d patchlevel %d\n",
  84. X!             basename(s), RELEASE_DATE, RELEASE, REVISION,
  85. X!             PATCHLEVEL);
  86. X  }
  87. X  
  88. X  /*
  89. X*** ups.orig    Thu Apr 11 08:11:35 1991
  90. X--- ups    Thu Apr 11 08:15:12 1991
  91. X***************
  92. X*** 10,14 ****
  93. X  set `who -r`
  94. X  if [ $9 = "S" -a -x /etc/upsd ]
  95. X  then
  96. X!     /etc/upsd
  97. X  fi
  98. X--- 10,14 ----
  99. X  set `who -r`
  100. X  if [ $9 = "S" -a -x /etc/upsd ]
  101. X  then
  102. X!     /etc/upsd &
  103. X  fi
  104. X*** version.h.orig    Thu Apr 11 08:11:35 1991
  105. X--- version.h    Thu Apr 11 08:15:12 1991
  106. X***************
  107. X*** 11,14 ****
  108. X  #define RELEASE_DATE    "03/30/91"
  109. X  #define RELEASE        1
  110. X  #define REVISION    0
  111. X! #define PATCHLEVEL    1
  112. X--- 11,14 ----
  113. X  #define RELEASE_DATE    "03/30/91"
  114. X  #define RELEASE        1
  115. X  #define REVISION    0
  116. X! #define PATCHLEVEL    2
  117. END_OF_FILE
  118.   if test 2727 -ne `wc -c <'Patch02'`; then
  119.     echo shar: \"'Patch02'\" unpacked with wrong size!
  120.   fi
  121.   # end of 'Patch02'
  122. fi
  123. echo shar: End of archive.
  124. exit 0
  125. ----
  126. Arthur W. Neilson III        | INET: art@pilikia.pegasus.com
  127. Bank of Hawaii Tech Support    | UUCP: uunet!ucsd!nosc!pilikia!art
  128.  
  129. exit 0 # Just in case...
  130. -- 
  131. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  132. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  133. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  134. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  135.